home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Video Toaster 4.0
/
Video Toaster v4.0.iso
/
arexx
/
modeler
/
fractalize.lwm
< prev
next >
Wrap
Text File
|
1993-12-13
|
1KB
|
42 lines
/* CMD: Fractalize
* iterate a process of subdivide and jitter to make a fractal like object
* By Arnie Cachelin © 1992, 1993 NewTek Inc. */
libadd = addlib("LWModelerARexx.port",0)
call req_begin 'Fractalize'
id_cnt = req_addcontrol("Levels (1-4)", "n",1)
id_noise = req_addcontrol("Noise (%)", "n",1)
id_mes = req_addcontrol("This operation", "T","could take a long time,")
id_mes = req_addcontrol("and create very", "T","many points if Level is high")
call req_setval id_cnt, 2
call req_setval id_noise, 5
if (~req_post()) then do
call req_end
exit
end
cnt = req_getval(id_cnt)
noise = req_getval(id_noise)
call req_end
scalefactor=noise/100
box=boundingbox()
parse var box n x1 x2 y1 y2 z1 z2
size=scalefactor * ((x2-x1)+(y2-y1)+(z2-z1))/3
call Triple()
call Jitter(size)
do l=2 to cnt
call Subdivide('SMOOTH')
size=size*scalefactor
call Jitter(size)
end
if (libadd) then call remlib("LWModelerARexx.port")
exit
syntax:
error:
call end_all
t=Notify(1,'!Rexx Script Error','@'ErrorText(rc),'Line 'SIGL)
if (libadd) then call remlib("LWModelerARexx.port")
exit